﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EV_MODEL
{

    public class CarbjModel
    {
        /// <summary>
        /// 机动车序号
        /// </summary>
        public string xh { set; get; }
        public string jyjgbh { set; get; }
        public string jcxdh { set; get; }
        public string jylsh { set; get; }
        public string jycs { set; get; }
        public string hphm { set; get; }
        public string hpzl { set; get; }
        public string clsbdh { set; get; }
        public string fdjh { set; get; }
        public string syxz { set; get; }
        public string ccdjrq { set; get; }
        public string rlzl { set; get; }
        public int zj { set; get; }
        public int zs { set; get; }
        public int zbzl { set; get; }
        public int zzl { set; get; }
        public string ccrq { set; get; }
        /// <summary>
        /// 驱动形式，填写车轮、驱动轮数量及驱动轮位置，如4×2前驱、4×2后驱、4×4四驱
        /// </summary>
        public string qdxs { set; get; }
        /// <summary>
        /// 00-注册登记安全检验，01-在用机动车安全检验（定检），02-临时检验，03-特殊检验，04-在用机动车安全检验（非定检）
        /// </summary>
        public string jylb { set; get; }
        /// <summary>
        /// (自定义）检验项目 E1-电气安全 E2-充电 E3-放电
        /// </summary>
        public string jyxm { set; get; }
        public DateTime dlsj { set; get; }
        public string dly { set; get; }
        public string ycy { set; get; }
        public string wjy { set; get; }
        /// <summary>
        /// 电气检验员*
        /// </summary>
        public string dqjyy { set; get; }
        public string clpp1 { set; get; }
        public string clxh { set; get; }
        public string syr { set; get; }
        public string cllx { set; get; }

        //EV 登录
        public string zz1 { set; get; }
        public string zz2 { set; get; }
        public string zz3 { set; get; }
        public string zz4 { set; get; }
        public string zz5 { set; get; }
        public string zz6 { set; get; }
        /// <summary>
        /// 电池类型，0-三元锂电池 1-磷酸铁锂电池
        /// </summary>
        public string batteryType { set; get; }
        /// <summary>
        /// 是否有直流充电插座，0-无 1-有
        /// </summary>
        public string hasDCInterface { set; get; }
        public double ev_R { set; get; }

        //EV计算得到
        public int ev_zh { set; get; }
        public int ev_targetF { set; get; }
        /// <summary>
        /// 0-轻型测功机 1-重型测功机
        /// </summary>
        public int dyna_lx { set; get; }
    }
    public class Result_Parent
    {
        public string jylsh { set; get; }
        public string jyjgbh { set; get; }
        public string jcxdh { set; get; }
        public string jyxm { set; get; }
        public string jycs { set; get; }
        public DateTime kssj { set; get; }
        public DateTime jssj { set; get; }
        public string jyy { set; get; }
        public string bz { set; get; }
        public void init(CarbjModel model, string jyy, string bz)
        {
            jylsh = model.jylsh;
            jyjgbh = model.jyjgbh;
            this.jcxdh = model.jcxdh;
            this.jycs = model.jycs;
            this.jyy = jyy;
            this.bz = bz;
        }
    }
    public class Result_ES : Result_Parent
    {
        public string Insulation_DC { set; get; }
        public string Insulation_PositiveAndPE { set; get; }
        public string Insulation_NegativeAndPE { set; get; }

        public string Insulation_AC { set; get; }
        public string Insulation_IRL1 { set; get; }
        public string Insulation_IRL2 { set; get; }
        public string Insulation_IRL3 { set; get; }

        public string R_PEandShell { set; get; }
        public string R_PEandPE { set; get; }
        public string Insulation_DC_Limit { set; get; }
        public string Insulation_AC_Limit { set; get; }
        public string R_PEandShell_Limit { set; get; }
        public string R_PEandPE_Limit { set; get; }
        public string Insulation_DC_Judge { set; get; }
        public string Insulation_AC_Judge { set; get; }
        public string R_PEandShell_Judge { set; get; }
        public string R_PEandPE_Judge { set; get; }
        public Result_ES(string jyxmdh)
        {
            this.jyxm = jyxmdh;
        }
    }
    public class Result_Charge : Result_Parent
    {

        public string BatteryMaxTemp { set; get; }
        public string BatteryMaxVolt { set; get; }
        public string BatteryDivVolt { set; get; }
        public string BatteryMaxTemp_Limit { set; get; }
        public string BatteryDivVolt_Limit { set; get; }
        public string BatteryMaxVolt_Limit { set; get; }
        public string BatteryMaxTemp_Judge { set; get; }
        public string BatteryMaxVolt_Judge { set; get; }
        public string BatteryDivVolt_Judge { set; get; }
        public Result_Charge(string jyxmdh)
        {
            this.jyxm = jyxmdh;
        }
    }
    public class Process_Charge : Result_Parent
    {
        public List<double> BatteryMaxTemp;
        public List<double> BatteryCellMaxVolt;
        public List<double> BatteryCellMinVolt;
        public List<double> BatteryCellDivVolt;
        public Process_Charge(string jyxmdh)
        {
            this.jyxm = jyxmdh;
        }
    }
    public class Result_Dyna : Result_Parent
    {
        public string BatteryMaxTemp { set; get; }
        public string BatteryCellMinVolt { set; get; }
        public string MotorTemp { set; get; }
        public string MCSTemp { set; get; }
        public string DCDCTemp { set; get; }
        public string BatteryMaxTemp_Limit { set; get; }
        public string BatteryCellMinVolt_Limit { set; get; }
        public string MotorTemp_Limit { set; get; }
        public string MCSTemp_Limit { set; get; }
        public string DCDCTemp_Limit { set; get; }
        public string BatteryMaxTemp_Judge { set; get; }
        public string BatteryCellMinVolt_Judge { set; get; }
        public string MotorTemp_Judge { set; get; }
        public string MCSTemp_Judge { set; get; }
        public string DCDCTemp_Judge { set; get; }
        public Result_Dyna(string jyxmdh)
        {
            this.jyxm = jyxmdh;
        }
    }
    public class Process_Dyna : Result_Parent
    {
        public List<double> BatteryMaxTemp;
        public List<double> BatteryCellMinVolt;
        public List<double> MotorTemp;
        public List<double> MCSTemp;
        public List<double> DCDCTemp;
        public List<double> Speed;
        public List<double> Force;
        public Process_Dyna(string jyxmdh)
        {
            this.jyxm = jyxmdh;
        }
    }

    public class Limit
    {
        public const double Insulation_DC = 100;
        public const double Insulation_AC = 1;
        public const double R_PEandShell = 0.1;
        public const double R_PEandPE = 0.2;
        public const double Charge_BatteryMaxTemp_syl = 60;
        public const double Charge_BatteryMaxTemp_lstl = 65;
        public const double Charge_BatteryMaxVolt_syl = 4.5;
        public const double Charge_BatteryMaxVolt_lstl = 3.85;
        public const double Charge_BatteryDivVolt = 3.85;
        public const double Dyna_BatteryMaxTemp = 65;
        public const double Dyna_BatteryCellMinVolt_syl = 1.8;
        public const double Dyna_BatteryCellMinVolt_lstl = 1.5;
        public const double Dyna_MotorTemp = 175;
        public const double Dyna_MCSTemp = 95;
        public const double Dyna_DCDCTemp = 95;
    }
}
